/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mti.javashare.beans;

import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Sinheldrin
 */
@Entity
@Table(name = "file")
@XmlRootElement(name = "file")
public class File implements Serializable
{
    private int id;
    @Column(name="id")
    @Id
    @GeneratedValue
    public int getId() { return id; }
    public void setId(int id) { this.id = id; }
    
    private String name;
    @Column(name="name")
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    
    private String description;
    @Column(name = "description")
    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }
    
    private User user;
    @ManyToOne
    @JoinColumn(name = "iduser")
    @XmlTransient
    public User getUser() { return user; }
    public void setUser(User user) { this.user = user; }
}
